﻿using Fake_Shop_WebApi.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Fake_Shop_WebApi.Services
{
    /// <summary>
    /// 获取旅游路线
    /// </summary>
   public interface ITouristRouteRepository
    {
        /// <summary>
        /// 获取所有旅游路线
        /// </summary>
        /// <returns></returns>
       Task< IEnumerable<TouristRoute>> GetTouristRoutesAsync(string keyword,string ratingOperator,int? ratingValue);
        /// <summary>
        /// 根据Id获取旅游线路
        /// </summary>
        /// <param name="touristRouteId"></param>
        /// <returns></returns>
       Task< TouristRoute> GetTouristRouteAsync(Guid touristRouteId);
        /// <summary>
        /// 判断传入的值是否存在
        /// </summary>
        /// <param name="touristRouteId"></param>
        /// <returns></returns>
       Task< bool> GetTouristRouteExistsAsync(Guid touristRouteId);
        /// <summary>
        /// 获取所有旅游图片
        /// </summary>
        /// <param name="touristRouteId"></param>
        /// <returns></returns>
       Task< IEnumerable<TouristRoutePicture>> GetTouristRoutePicturesAsync(Guid touristRouteId);
        /// <summary>
        /// 根据图片id获取图片
        /// </summary>
        /// <param name="pictId"></param>
        /// <returns></returns>
       Task< TouristRoutePicture> GetPictureAsync(int pictId);
        /// <summary>
        /// Post 添加旅游数据
        /// </summary>
        /// <param name="touristRoute"></param>
        void AddTouristRoutePicture(TouristRoute touristRoute);
        /// <summary>
        /// 添加旅游路线的图片
        /// </summary>
        /// <param name="touristRouteId"></param>
        /// <param name="pictId"></param>
        void AddTouristRoutePictures(Guid touristRouteId,TouristRoutePicture touristRoutePicture);
        /// <summary>
        /// 删除旅游路线
        /// </summary>
        /// <param name="touristRoute"></param>
        void DeleteTouristRoute(TouristRoute touristRoute);

        void DeleteTouristRoutePictures(TouristRoutePicture touristRoutePicture);
        /// <summary>
        /// 解析批量旅游路线的Id
        /// </summary>
        /// <param name="Ids"></param>
        /// <returns></returns>
        Task<IEnumerable<TouristRoute>> GetTouristRouteByIdsAsync(IEnumerable<Guid> Ids);
        /// <summary>
        /// 批量删除旅游路线
        /// </summary>
        /// <param name="touristRoutes"></param>
        void DeleteTouristRoutes(IEnumerable<TouristRoute> touristRoutes);
        /// <summary>
        /// 获取用户购物车数据
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        Task<ShoppingCart> GetShoppingCartByUserIdAsync(string UserId);
        /// <summary>
        /// 添加购物车默认值
        /// </summary>
        /// <param name="shoppingCart"></param>
        /// <returns></returns>
        Task CreateShoppingCartAsync(ShoppingCart shoppingCart);
        /// <summary>
        /// 添加购物车数据
        /// </summary>
        /// <param name="lineItem"></param>
        /// <returns></returns>
        Task AddShoppingCartItem(LineItem lineItem);
        /// <summary>
        /// 获取用户指定id的购物车列表
        /// </summary>
        /// <param name="lneId"></param>
        /// <returns></returns>
        Task<LineItem> GetShoppingCartItemAsync(int lineId);
        /// <summary>
        /// 删除购物车数据
        /// </summary>
        /// <param name="lineItem"></param>
        void DeleteShopingCart(LineItem lineItem);
        /// <summary>
        /// 获取批量购物车数据
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
         Task<IEnumerable<LineItem>> GeshoppingCartsByIdListAsync(IEnumerable<int> ids);
        /// <summary>
        /// 批量删除数据
        /// </summary>
        void DeleteShoppingCartItems(IEnumerable<LineItem> lines);
        /// <summary>
        /// 生成订单
        /// </summary>
        /// <param name="order"></param>
        /// <returns></returns>
        Task AddOrderAsync(Order order);
        /// <summary>
        /// 获取订单列表
        /// </summary>
        /// <param name="order"></param>
        /// <returns></returns>
        Task<ICollection<Order>> GetOrderAsync(string userId);
        /// <summary>
        /// 获取订单详情
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        Task<Order> GetOrderByIdAsync(Guid orderId);
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <returns></returns>
       Task< bool> SaveAsync();
    }
}
